{% extends "cab/base.html" %}
{% load snippets %}

{% block extrahead %}
{{ block.super }}
<link rel="alternate" type="application/rss+xml" title="{{cur_site.name}} latest snippets tagged with {{tag}} (rss)"
 href="{% url rss_feeds "snippets" %}tags/{{tag}}/" />
<link rel="alternate" type="application/atom+xml" title="{{cur_site.name}} latest snippets tagged with {{tag}} (atom)" 
 href="{% url atom_feeds "snippets" %}tags/{{tag}}/" />
{% endblock %}

{% block title %}Snippets tagged with "{{tag}}" - {{ block.super }}{% endblock %}

{% block content %}

<h1>Snippet Tag <em>{{tag}}</em></h1>

<span id="snippet_feeds" class="feeds">
Follow:
    <a class="feedlink" href="{% url rss_feeds "snippets" %}tags/{{tag}}/" rel="alternate"  type="application/rss+xml">
       <img class="feedicon" src="{{MEDIA_URL}}images/rss_icon.png" alt="rss icon"/>
    </a>
    <a class="feedlink" href="{% url atom_feeds "snippets" %}tags/{{tag}}/" rel="alternate"  type="application/atom+xml">
       <img class="feedicon" src="{{MEDIA_URL}}images/atom_icon.png" alt="atom icon"/>
    </a>
</span>


<h2>Related Tags</h2>
{% if related_tags %}
{% taglist related_tags "snippets_by_tag" tag %}
{% else %}
There are not tags related to <em>{{tag}}</em>.
{% endif %}

<h2>Snippets Tagged with <em>{{tag}}</em></h2>


{% if object_list %}
<ul>
{% for snippet in object_list %}
<li>{% show_snippet snippet %}</li>
{% endfor %}
</ul>

{% paginator %}
{% endif %}

<p>{{ hits }} snippet{{ hits|pluralize }} tagged with <em>{{tag}}</em>.</p>

{% endblock %}